﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;
using res = Sob.Resource.Models.Account.Account;
using resWeb = Sob.Resource.Models.Web.Web;

namespace Eieboom.Models
{
    public class ChangePasswordModel
    {
        [Required(ErrorMessageResourceType = typeof(resWeb), ErrorMessageResourceName = "Common_Required_Msg")]
        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(res), Name = "OldPassword")]
        public string OldPassword { get; set; }

        [Required(ErrorMessageResourceType = typeof(resWeb), ErrorMessageResourceName = "Common_Required_Msg")]
        [StringLength(100, ErrorMessageResourceType = typeof(res), ErrorMessageResourceName = "NewPassword_Length_Msg", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(res), Name = "NewPassword")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(res), Name = "ConfirmPassword")]
        [Compare("NewPassword", ErrorMessageResourceType = typeof(res), ErrorMessageResourceName = "ConfirmPassword_Compare_Msg")]
        public string ConfirmPassword { get; set; }
    }

    public class LogOnModel
    {
        [Required(ErrorMessageResourceType = typeof(resWeb), ErrorMessageResourceName = "Common_Required_Msg")]
        [Display(ResourceType = typeof(res), Name = "UserName")]
        public string UserName { get; set; }

        [Required(ErrorMessageResourceType = typeof(resWeb), ErrorMessageResourceName = "Common_Required_Msg")]
        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(res), Name = "Password")]
        public string Password { get; set; }

        [Display(ResourceType = typeof(res), Name = "RememberMe")]
        public bool RememberMe { get; set; }
    }

    public class RegisterModel
    {
        [Required(ErrorMessageResourceType = typeof(resWeb), ErrorMessageResourceName = "Common_Required_Msg")]
        [Display(ResourceType = typeof(res), Name = "UserName")]
        public string UserName { get; set; }

        [Required(ErrorMessageResourceType = typeof(resWeb), ErrorMessageResourceName = "Common_Required_Msg")]
        [DataType(DataType.EmailAddress)]
        [Display(ResourceType = typeof(res), Name = "EmailAddress")]
        public string Email { get; set; }

        [Required(ErrorMessageResourceType = typeof(resWeb), ErrorMessageResourceName = "Common_Required_Msg")]
        [StringLength(100, ErrorMessageResourceType = typeof(res), ErrorMessageResourceName = "Password_Length_Msg", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(res), Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(res), Name = "ConfirmPassword")]
        [Compare("Password", ErrorMessageResourceType = typeof(res), ErrorMessageResourceName = "ConfirmPassword_Compare_Msg")]
        public string ConfirmPassword { get; set; }
    }
}
